import request from '@/utils/request';
import { AxiosPromise } from 'axios';

import { knowledge, system, aiqa } from '@/api/apiModulesType';
// 查询知识库
export const apiEnterpriseKnowledgeList = (query?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${knowledge}/enterpriseFilesTree/queryAllKnowLab`,
        method: 'get',
        params: query
    });
};
// 查询企业文档树树-左边树结构
export const apiTreeFileSelectTree = (query?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${knowledge}/enterpriseFilesTree/queryTreeFreePerm`,
        method: 'get',
        params: query
    });
};

// 新增文件夹配置
export const apiSysPortalconfigureAdd = (data?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${knowledge}/api/sysPortalConfigure`,
        method: 'post',
        data: data
    });
};

// 查询文件夹配置
export const apiSysPortalconfigureGetList = (query?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${knowledge}/api/sysPortalConfigure`,
        method: 'get',
        params: query
    });
};

// 更新文件夹配置
export const apiSysPortalconfigureUpdata = (data?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${knowledge}/api/sysPortalConfigure`,
        method: 'put',
        data: data
    });
};

// 删除文件夹配置
export const apiSysPortalconfigureDel = (data?: any): AxiosPromise<any[]> => {
    return request({
        url: `/${knowledge}/api/sysPortalConfigure`,
        method: 'delete',
        data: data
    });
};
